/**
 * 通用类型定义
 */

/**
 * 统一响应格式
 */
export interface ApiResponse<T = any> {
  success: boolean
  data?: T
  errorMessage?: string
  errorCode?: string
  timestamp?: string
}

/**
 * 分页请求参数
 */
export interface PageRequest {
  page?: number
  pageSize?: number
  sortBy?: string
  sortOrder?: 'asc' | 'desc'
}

/**
 * 分页响应数据
 */
export interface PageResponse<T> {
  items: T[]
  total: number
  page: number
  pageSize: number
  totalPages: number
}

/**
 * 选项类型
 */
export interface Option<T = string> {
  label: string
  value: T
  disabled?: boolean
}

/**
 * 树形节点
 */
export interface TreeNode<T = any> {
  key: string
  title: string
  children?: TreeNode<T>[]
  data?: T
  disabled?: boolean
}
